/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package com.xiashitech.agent.instrumentation.okhttp.v3.inst;

import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import io.opentelemetry.javaagent.instrumentation.okhttp.v3_0.OkHttp3DispatcherInstrumentation;
import io.opentelemetry.javaagent.instrumentation.okhttp.v3_0.OkHttp3Instrumentation;

import java.util.Arrays;
import java.util.List;

import static java.util.Arrays.asList;

@AutoService(InstrumentationModule.class)
public class XSOkHttp3InstrumentationModule extends InstrumentationModule {

  public XSOkHttp3InstrumentationModule() {
    super("XSOkhttp", "XSOkhttp-3.0");
  }

  @Override
  public List<TypeInstrumentation> typeInstrumentations() {
    return asList(new XSOkHttp3Instrumentation());
  }

  public List<String> getAdditionalHelperClassNames() {
    return Arrays.asList("com.xiashitech.agent.instrumentation.okhttp.v3.XSTracingInterceptor",
            "com.xiashitech.agent.instrumentation.okhttp.common.ResponseHeaderGetter");
  }
}
